package com.rmb.controller;

import com.rmb.mart.entity.userinfo.UserInfo;
import com.rmb.service.BalanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName BalanceController
 * @Description 账户余额回显
 * @Author lvshook
 * @Date 2021/1/21 11:38
 * @Version 1.0
 **/
@RestController
@RequestMapping("/rmb/balance")
public class BalanceController {

    @Autowired
    private BalanceService balanceService;

    /**
     * 账户余额
     * @param id
     * @return
     */
    @GetMapping("/findone")
    public UserInfo findOne(@RequestParam("id") Long id){
        return balanceService.queryById(id);
    }

}
